package com.vhall.component.controller.praise;


import com.vhall.component.entity.praise.vo.RoomLikeReqVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;


/**
 * 点赞,转发
 * @author lsl
 * @since 2021/6/16
 */
@FeignClient(value = "RoomLikeFacade", path = "/v4/room-like")
public interface RoomLikeFacade {


    /**
     * 获取点赞数量
     *
     * @param accountId 用户id
     * @param roomId    房间id
     * @return 返回值
     */
    @GetMapping("/count-is-like")
    Long countIsLike(@RequestParam("accountId") String accountId, @RequestParam("roomId") String roomId);

    /**
     * 点赞
     *
     * @param reqVO 点赞请求参数
     * @return 返回值
     */
    @PostMapping("/like")
    Boolean like(@Validated RoomLikeReqVO reqVO);

    /**
     * 转发
     */
    @PostMapping("/forward")
    Boolean forward(@Validated RoomLikeReqVO reqVO);
}
